<?php
/* 错误信息表 */
namespace App\Models;


class StErrorLog extends StModel
{
    protected $table = 'st_error_log';// 上工回调log表

    protected $primaryKey = 'id';

    /**
     * 记录数据
     *
     * @param $url
     * @param $request
     */
    public function record($url, $request, $msg)
    {
        $data = [
            'url' => $url,
            'request' => json_encode($request),
            'msg' => json_encode($msg),
            'created_at' => date('Y-m-d H:i:s'),
            'updated_at' => date('Y-m-d H:i:s')
        ];

        $this->insert_db($data);
    }
}